home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Apple II / Programming & Utilities / Apple IIgs APW Intro Prog Src / HP.ASM / HP.ASM.txt < prev    next >
Encoding:
Text File  |  1987-08-28  |  7.1 KB  |  170 lines

  1.  
  2. ******************************************************************************
  3. *                                                                            *
  4. *         HodgePodge:  An example Apple IIGS Desktop application             *
  5. *                                                                            *
  6. *         Written in 65816 Assembler by the Apple IIGS Tools Team            *
  7. *  Modified by Ben Koning for "Programmer's Introduction to the Apple IIGS"  *
  8. *                                                                            *
  9. *             Copyright (c) 1986-87 by Apple Computer, Inc.                  *
  10. *                                                                            *
  11. *   ----------------------------------------------------------------------   *
  12. *                                                                            *
  13. *           This program and its derivatives are licensed only for           *
  14. *           use on Apple computers.                                          *
  15. *                                                                            *
  16. *           Works based on this program must contain and                     *
  17. *           conspicuously display this notice.                               *
  18. *                                                                            *
  19. *           This software is provided for your evaluation and to             *
  20. *           assist you in developing software for the Apple IIGS             * 
  21. *           computer.                                                        *
  22. *                                                                            *
  23. *           This is not a distribution license. Distribution of              *
  24. *           this and other Apple software requires a separate                *
  25. *           license. Contact the Software Licensing Department of            *
  26. *           Apple Computer, Inc. for details.                                *
  27. *                                                                            *
  28. *           DISCLAIMER OF WARRANTY                                           *
  29. *                                                                            *
  30. *           THE SOFTWARE IS PROVIDED "AS IS" WITHOUT                         *
  31. *           WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,                 *
  32. *           WITH RESPECT TO ITS MERCHANTABILITY OR ITS FITNESS               *
  33. *           FOR ANY PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO               *
  34. *           THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH              *
  35. *           YOU.  SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU (AND              *
  36. *           NOT APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE)                 *
  37. *           ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING,               *
  38. *           REPAIR OR CORRECTION.                                            *
  39. *                                                                            *
  40. *           Apple does not warrant that the functions                        *
  41. *           contained in the Software will meet your requirements            *
  42. *           or that the operation of the Software will be                    *
  43. *           uninterrupted or error free or that defects in the               *
  44. *           Software will be corrected.                                      *
  45. *                                                                            *
  46. *           SOME STATES DO NOT ALLOW THE EXCLUSION                           *
  47. *           OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY                *
  48. *           NOT APPLY TO YOU.  THIS WARRANTY GIVES YOU SPECIFIC              *
  49. *           LEGAL RIGHTS AND YOU MAY ALSO HAVE OTHER RIGHTS                  *
  50. *           WHICH VARY FROM STATE TO STATE.                                  *
  51. *                                                                            *
  52. *   ----------------------------------------------------------------------   *
  53. *                                                                            *
  54. *   ASM65816 Code file "HP.ASM" -- Main routine and COPY's for other files   *
  55. *                                                                            *
  56. ******************************************************************************
  57.  
  58.  
  59.  
  60. ******************************************************************************
  61. *                                                                            *
  62. *                       Version 1.0 -- August 1987                           *
  63. *                                                                            *
  64. ******************************************************************************
  65.  
  66.  
  67.  
  68.                ABSADDR ON
  69.                KEEP    HP
  70.                MCOPY   HP.MACROS
  71.  
  72. ****************************************************************
  73. *
  74. *  The main program
  75. *
  76. ****************************************************************
  77. HodgePodge     START
  78.                using GlobalData
  79.  
  80. ;----------------------------------------------------
  81. ;
  82. ; Global equates used throughout the program.
  83. ;
  84. True           gequ $8000
  85. False          gequ $0000
  86.  
  87.  
  88. ;----------------------------------------------------
  89. ;
  90. ; Set the data bank to code bank so I can use absolute
  91. ; addressing.
  92. ;
  93.                phk
  94.                plb
  95.  
  96. ;----------------------------------------------------
  97. ;
  98. ; Save address of D for use later
  99. ;
  100.                tdc
  101.                sta MyZP
  102.  
  103. ;----------------------------------------------------
  104. ;
  105. ; Load Init everything.
  106. ;
  107.                pha
  108.                PushWord #$0080          ; mode to use for QD
  109.                jsl StartupTools
  110.                pla                             ;Necessary because StartUpTools
  111. ;                                              ;uses Pascal calling convention
  112. ;                                              ;leaving input params on stack
  113.                pla
  114.                bne AllDone
  115.  
  116.                jsr SetupMenus
  117.  
  118.  
  119. ;----------------------------------------------------
  120. ;
  121. ; Initialize system flags.
  122. ;
  123.                stz LastWType
  124.                stz QuitFlag
  125.                stz Windex
  126.  
  127. ;----------------------------------------------------
  128. ;
  129. ; Zero the print record handle.
  130. ;
  131.                stz PrintRecord
  132.                stz PrintRecord+2
  133.  
  134. ;----------------------------------------------------
  135. ;
  136. ; Take events until user quits.
  137. ;
  138.                jsr MainEvent
  139.  
  140. ;----------------------------------------------------
  141. ;
  142. ; All is done, let's shut down.
  143. ;
  144. AllDone        anop
  145.                jsl ShutDownTools
  146.  
  147.                PushLong PrintRecord     ; get rid of print record handle
  148.                _DisposeHandle           ; if PrintRecord has zero in it
  149. ;                                       ; dispose handle will fail but
  150. ;                                       ; we don't care.
  151.  
  152.                _Quit QuitParams
  153.  
  154.                END
  155.  
  156.  
  157.  
  158.                COPY  7/E16.WINDOW
  159.                COPY  7/E16.DIALOG
  160.  
  161.                COPY  INIT.ASM
  162.                COPY  EVENT.ASM
  163.                COPY  MENU.ASM
  164.                COPY  WINDOW.ASM
  165.                COPY  DIALOG.ASM
  166.                COPY  FONT.ASM
  167.                COPY  PRINT.ASM
  168.                COPY  IO.ASM
  169.                COPY  GLOBALS.ASM
  170.